<?php
/**
 *	@name		担保交易
 *	@author		Jeffery
 *	@qq			1017756891
 *	@email		1017756891@qq.com
 *	@website	http://www.iweitao.net
**/

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}
$groupid = $_G['groupid'];
$allowgroup = $_G['cache']['plugin']['online_alipay']['allowgroup'];
$allowgroup = unserialize($allowgroup);
if(!in_array($groupid,$allowgroup) && !defined('IN_ADMINCP')) {
	showmessage("对不起，您所在的用户组不允许使用担保交易!");
}
class safe_weitao_plugin_online_alipay{
	public function getparameter($parameter,$isget,$isnum) {
		if($isget == 1) {
			$parameter = $_GET[$parameter];
		} else {
			$parameter = $_POST[$parameter];
		}
		if($isnum == 1) {
			$parameter = self::safenum($parameter);
		} else {
			$parameter = self::openfont($parameter);
		}
		return $parameter;
	}
	
	public function safenum($number) {
		$number = intval($number);
		return $number;
	}
	
	public function openfont($safefont) {
		$safefont = addslashes($safefont);
		return $safefont;
	}
	
	public function closefont($safefont) {
		$safefont = stripslashes($safefont);
		return $safefont;
	}

}
require_once "functions.php";
?>